import { createRouter, createWebHistory } from 'vue-router'
import Home from '../views/Home.vue'
import Excel from '../views/Excel.vue'

const routes = [
  {
    path: '/',
    name: 'Home',
    component: Home
  },
  {
    path: '/excel',
    name: 'Excel',
    component: Excel,
    meta: {
      keepAlive: false
    },
    beforeEnter: (to, from, next) => {
      to.meta.key = new Date().getTime()
      next()
    }
  }
]

const router = createRouter({
  history: createWebHistory(),
  routes
})

export default router 